import org.ini4j.Ini;
import javax.swing.*;

/**
 * Representation of the Periplasm Area, inherited from Area Class
 * @author Luc Peres
 * @version 2.0
 */
public class Periplasm extends Area{

	/**
	 * Periplasm Constructor
	 */
	public Periplasm(){
		super();
		this.initialize();
	}
	
	/**
	 * Initialization of each member got from the Param Class
	 */
	public void initialize() {
		Ini params = Param.getParam().getParams();
		this.GSH = Double.parseDouble(params.get("Periplasm/initialization", "GSH"));
		this.GSSG = Double.parseDouble(params.get("Periplasm/initialization", "GSSG"));
		this.O2 = Double.parseDouble(params.get("Periplasm/initialization", "O2"));
	}
	
	/**
	 * Prints every member of the Periplasm
	 * @param textArea: Window's textArea
	 */
	public void print(JTextArea textArea) {
		textArea.setText(textArea.getText() + "\nArea: Periplasm");
		super.print(textArea, "Periplasm");
	}
}
